<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel=stylesheet href="css/style.css" type="text/css">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic-el" prefix="logic" %>
<title>Fantacalcio | Ricerca User</title>
</head>
<body>
	<c:if test="${userInSession == null || userInSession.role.codRole != 'ADMIN'}">
		<c:redirect url="Logout.do"></c:redirect>
	</c:if>
		
	<c:import url="/head.jsp"/>
	
	<c:import url="/menu.jsp"/>
	
	<c:import url="menuUser.jsp"/>
	
	<div class="context">
		<h1> Ricerca User </h1>
		<form action="PrepareListUserAction.do" method="post">
			<table>
				<tr>
					<td><label class="prop">Nome:</label></td>
					<td><input type="text" name="nome"/></td>
				</tr>
				<tr>
					<td><label class="prop">Cognome:</label></td>
					<td><input type="text" name="cognome"/></td>
				</tr>
				<tr>
					<td><label class="prop">Username:</label></td>
					<td><input type="text" name="username"/></td>
				</tr>
				<tr>
					<td><label class="prop">Attivo:</label></td>
					<td>
						SI <input type="radio" name="attivo" value="SI"/>
						NO <input type="radio" name="attivo" value="NO"/>
					</td>
				</tr>
				<tr>
					<td><label class="prop">Ruolo:</label></td>
					<td>
						<select name="idRole">
							<option value="0">--seleziona un ruolo--</option>
							<logic:iterate id="role" name="listaRole">
								<option value="${role.id }">${role.codRole}</option>
							</logic:iterate>
						</select>
					</td>
				</tr>
			</table>
			<input class="bottomS" type="submit" value="Cerca"/>
			<div class="bottomD"><html:reset /></div>
		</form>
	</div>
	
	<c:import url="/footer.jsp"/>

</body>
</html>